﻿using Domain.Entities;
using FluentMigrator;
using FrameworkCore.Extensions;

namespace AiBLSmartEdu.Module.Cust.API.Migrations;

[Migration(202408161403)]
public class CustomerAddColumn : ForwardOnlyMigration
{
    public override void Up()
    {
        Alter.Table(MigrationExpressions.GetTableName(typeof(Customer)))
            .AddColumn(MigrationExpressions.ColumnNameFor<Customer>(nameof(Customer.Username))).AsString().Nullable()
            .AddColumn(MigrationExpressions.ColumnNameFor<Customer>(nameof(Customer.PasswordHash))).AsString().Nullable()
            .AddColumn(MigrationExpressions.ColumnNameFor<Customer>(nameof(Customer.Email))).AsString().Nullable();
    }
}
